package com.zz.springcloud.controller;

import com.zz.springcloud.entity.Member;
import com.zz.springcloud.service.MemberFeignService;
import com.zz.springcloud.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/member/consumer/openfeign")
public class MemberConsumerFeignController {
    @Resource
    private MemberFeignService memberFeignService;

    @GetMapping(value = "/get/{id}")
    public Result<Member> getMemberById(@PathVariable("id") Long id){
        return memberFeignService.getMembertById(id);
    }
}
